package com.example.chapter03;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.example.chapter03.Utils.DateUtil;
import com.example.chapter03.Utils.Utils;

public class ButtonStyleActivity extends AppCompatActivity {

    private TextView tv_result;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_button_style);
        tv_result = findViewById(R.id.tv_result);
        Log.d("ButtonStyleActivity","这是一条调试信息");
    }

     public void doClick(View view)
     {
         String desc=String.format("%s 您点击了按钮:  %s", DateUtil.getNowTime(),((Button)view).getText());
         tv_result.setText(desc);
     }
}